using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using LeisureCenter.Properties;

namespace LeisureCenter.Forms
{
    public partial class LoadingForm : Form
    {
        public LoadingForm()
        {
            InitializeComponent();
            pbProgress.Max = Settings.Default.LoadingSteps;
        }

        public void Verbose(string message)
        {
            lblProgress.Text = message;
            lblProgress.Refresh();
        }

        public void VerboseWithStep(string message)
        {
            pbProgress.Position++;
            pbProgress.Refresh();
            Verbose(message);
        }

        private void LoadingForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            Settings.Default.LoadingSteps = pbProgress.Position + 1;
        }
    }
}